WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
wolf::TrajectoryBase Class Reference

Trajectory: the frames of the problem, ordered by time stamp. More...

#include <core/trajectory/trajectory_base.h>

Inheritance diagram for wolf::TrajectoryBase:
[legend]

Public Member Functions

 TrajectoryBase ()
 Constructor. More...
 
 ~TrajectoryBase () override
 
bool hasChildren () const override
 Returns whether the node has children in the Wolf tree. More...
 
SizeEigen size () const
 Returns the number of frames. More...
 
FrameConstPtrMap getFrameMap () const
 Returns the frames by time stamp. More...
 
FramePtrMap getFrameMap ()
 Returns the frames by time stamp. More...
 
FrameBaseConstPtr getLastFrame () const
 Returns the last frame (nullptr if empty) More...
 
FrameBasePtr getLastFrame ()
 Returns the last frame (nullptr if empty) More...
 
FrameBaseConstPtr getFirstFrame () const
 Returns the first frame (nullptr if empty) More...
 
FrameBasePtr getFirstFrame ()
 Returns the first frame (nullptr if empty) More...
 
FrameBaseConstPtr getNextFrame (FrameBaseConstPtr, const unsigned int &i=1) const
 Returns the i-th frame after a frame (nullptr if none) More...
 
FrameBasePtr getNextFrame (FrameBasePtr, const unsigned int &i=1)
 Returns the i-th frame after a frame (nullptr if none) More...
 
FrameBaseConstPtr getPreviousFrame (FrameBaseConstPtr, const unsigned int &i=1) const
 Returns the i-th frame before a frame (nullptr if none) More...
 
FrameBasePtr getPreviousFrame (FrameBasePtr, const unsigned int &i=1)
 Returns the i-th frame before a frame (nullptr if none) More...
 
TimeStamp closestTimeStampToTimeStamp (const TimeStamp &_ts) const
 Returns the time stamp of the frame closest to a time stamp (invalid if empty) More...
 
FrameBaseConstPtr closestFrameToTimeStamp (const TimeStamp &_ts) const
 Returns the frame closest to a time stamp (nullptr if empty) More...
 
FrameBasePtr closestFrameToTimeStamp (const TimeStamp &_ts)
 Returns the frame closest to a time stamp (nullptr if empty) More...
 
bool hasTimeStamp (const TimeStamp &_ts) const
 Returns whether there is a frame at a time stamp. More...
 
bool hasFrame (FrameBaseConstPtr _frame) const
 Returns whether the frame belongs to the trajectory. More...
 
virtual void printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const
 Prints the information of this node (not of its children) More...
 
void print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const
 Prints this node and, depending on the depth, its children. More...
 
virtual CheckLog localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const
 Checks the consistency of this node (not of its children) More...
 
bool check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const
 Checks the consistency of this node and its children, composing the log. More...
 
void getFactorList (FactorBaseConstPtrList &_fac_list) const
 Adds the factors of all the frames to a list. More...
 
void getFactorList (FactorBasePtrList &_fac_list)
 Adds the factors of all the frames to a list. More...
 
- Public Member Functions inherited from wolf::NodeBase
 NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="")
 Constructor. More...
 
virtual ~NodeBase ()=default
 Destructor. More...
 
unsigned int nodeId () const
 Returns the node id, unique over the whole Wolf tree. More...
 
std::string getCategory () const
 Returns the category of the node. More...
 
std::string getType () const
 Returns the type (subcategory) of the node. More...
 
std::string getName () const
 Returns the name of the node. More...
 
bool isRemoving () const
 Returns whether the node is being removed. More...
 
virtual bool hasChildren () const =0
 Returns whether the node has children in the Wolf tree. More...
 
void setType (const std::string &_type)
 Sets the type (subcategory) of the node. More...
 
void setName (const std::string &_name)
 Sets the name of the node. More...
 
ProblemConstPtr getProblem () const
 Returns the problem the node belongs to. More...
 
ProblemPtr getProblem ()
 Returns the problem the node belongs to. More...
 

Protected Attributes

StateKeys frame_structure_
 Structure (keys) of the frames in the trajectory (unused) More...
 
- Protected Attributes inherited from wolf::NodeBase
ProblemWPtr problem_ptr_
 Problem the node belongs to. More...
 
unsigned int node_id_
 Node id. It is unique over the whole Wolf Tree. More...
 
std::string node_category_
 Text label identifying the category of node ("SENSOR", "FEATURE", etc) More...
 
std::string node_type_
 Type or subcategory of node (derived class name: "SensorOdom2d", etc) More...
 
std::string node_name_
 
bool is_removing_
 A flag for safely removing nodes from the Wolf tree. See remove(). More...
 

Additional Inherited Members

- Protected Member Functions inherited from wolf::NodeBase
virtual void setProblem (ProblemPtr _prob_ptr)
 Sets the problem the node belongs to. More...
 

Detailed Description

Trajectory: the frames of the problem, ordered by time stamp.

Constructor & Destructor Documentation

◆ TrajectoryBase()

wolf::TrajectoryBase::TrajectoryBase ( )

Constructor.

◆ ~TrajectoryBase()

wolf::TrajectoryBase::~TrajectoryBase ( )
override

Member Function Documentation

◆ check()

bool wolf::TrajectoryBase::check ( CheckLog &  _log,
bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const

Checks the consistency of this node and its children, composing the log.

◆ closestFrameToTimeStamp() [1/2]

FrameBasePtr wolf::TrajectoryBase::closestFrameToTimeStamp ( const TimeStamp &  _ts)

Returns the frame closest to a time stamp (nullptr if empty)

◆ closestFrameToTimeStamp() [2/2]

FrameBaseConstPtr wolf::TrajectoryBase::closestFrameToTimeStamp ( const TimeStamp &  _ts) const

Returns the frame closest to a time stamp (nullptr if empty)

◆ closestTimeStampToTimeStamp()

TimeStamp wolf::TrajectoryBase::closestTimeStampToTimeStamp ( const TimeStamp &  _ts) const

Returns the time stamp of the frame closest to a time stamp (invalid if empty)

◆ getFactorList() [1/2]

void wolf::TrajectoryBase::getFactorList ( FactorBaseConstPtrList &  _fac_list) const

Adds the factors of all the frames to a list.

◆ getFactorList() [2/2]

void wolf::TrajectoryBase::getFactorList ( FactorBasePtrList &  _fac_list)

Adds the factors of all the frames to a list.

◆ getFirstFrame() [1/2]

FrameBasePtr wolf::TrajectoryBase::getFirstFrame ( )
inline

Returns the first frame (nullptr if empty)

◆ getFirstFrame() [2/2]

FrameBaseConstPtr wolf::TrajectoryBase::getFirstFrame ( ) const
inline

Returns the first frame (nullptr if empty)

◆ getFrameMap() [1/2]

FramePtrMap wolf::TrajectoryBase::getFrameMap ( )
inline

Returns the frames by time stamp.

◆ getFrameMap() [2/2]

FrameConstPtrMap wolf::TrajectoryBase::getFrameMap ( ) const
inline

Returns the frames by time stamp.

◆ getLastFrame() [1/2]

FrameBasePtr wolf::TrajectoryBase::getLastFrame ( )
inline

Returns the last frame (nullptr if empty)

◆ getLastFrame() [2/2]

FrameBaseConstPtr wolf::TrajectoryBase::getLastFrame ( ) const
inline

Returns the last frame (nullptr if empty)

◆ getNextFrame() [1/2]

FrameBaseConstPtr wolf::TrajectoryBase::getNextFrame ( FrameBaseConstPtr  _frame,
const unsigned int &  i = 1 
) const

Returns the i-th frame after a frame (nullptr if none)

◆ getNextFrame() [2/2]

FrameBasePtr wolf::TrajectoryBase::getNextFrame ( FrameBasePtr  _frame,
const unsigned int &  i = 1 
)

Returns the i-th frame after a frame (nullptr if none)

◆ getPreviousFrame() [1/2]

FrameBaseConstPtr wolf::TrajectoryBase::getPreviousFrame ( FrameBaseConstPtr  _frame,
const unsigned int &  i = 1 
) const

Returns the i-th frame before a frame (nullptr if none)

◆ getPreviousFrame() [2/2]

FrameBasePtr wolf::TrajectoryBase::getPreviousFrame ( FrameBasePtr  _frame,
const unsigned int &  i = 1 
)

Returns the i-th frame before a frame (nullptr if none)

◆ hasChildren()

bool wolf::TrajectoryBase::hasChildren ( ) const
inlineoverridevirtual

Returns whether the node has children in the Wolf tree.

Implements wolf::NodeBase.

◆ hasFrame()

bool wolf::TrajectoryBase::hasFrame ( FrameBaseConstPtr  _frame) const
inline

Returns whether the frame belongs to the trajectory.

◆ hasTimeStamp()

bool wolf::TrajectoryBase::hasTimeStamp ( const TimeStamp &  _ts) const
inline

Returns whether there is a frame at a time stamp.

◆ localCheck()

CheckLog wolf::TrajectoryBase::localCheck ( bool  _verbose,
std::ostream &  _stream,
std::string  _tabs = "" 
) const
virtual

Checks the consistency of this node (not of its children)

◆ print()

void wolf::TrajectoryBase::print ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream = std::cout,
std::string  _tabs = "" 
) const

Prints this node and, depending on the depth, its children.

◆ printHeader()

void wolf::TrajectoryBase::printHeader ( int  depth,
bool  factored_by,
bool  metric,
bool  state_blocks,
std::ostream &  stream,
std::string  _tabs = "" 
) const
virtual

Prints the information of this node (not of its children)

◆ size()

SizeEigen wolf::TrajectoryBase::size ( void  ) const
inline

Returns the number of frames.

Member Data Documentation

◆ frame_structure_

StateKeys wolf::TrajectoryBase::frame_structure_
protected

Structure (keys) of the frames in the trajectory (unused)


The documentation for this class was generated from the following files: